import torch

class Config:
    # 数据参数
    DATA_PATH = "data/maomeng.xlsx"  # 修改为你的xlsx文件路径
    WINDOW_SIZE = 24
    OVERLAP = 0.5
    PREDICT_AHEAD = 1
    
    # 模型参数
    INPUT_DIM = 14  # 10个气象指标 + 4个时间特征
    HIDDEN_DIM = 128
    NUM_LAYERS = 1
    OUTPUT_DIM = 14
    
    # 训练参数
    BATCH_SIZE = 128
    EPOCHS = 100
    LEARNING_RATE = 0.0003
    WEIGHT_DECAY = 1e-3
    GRADIENT_CLIP = 0.1
    
    # 添加学习率调度器参数
    LR_SCHEDULER = True
    LR_SCHEDULER_PATIENCE = 10
    LR_SCHEDULER_FACTOR = 0.7
    MIN_LR = 1e-6
    
    # OneCycleLR参数调整
    ONE_CYCLE_PCT_START = 0.2
    DIV_FACTOR = 10.0
    FINAL_DIV_FACTOR = 1e3
    
    # 设备配置 - 针对 M1/M2 Mac 优化
    DEVICE = 'mps' if torch.backends.mps.is_available() else 'cpu'
    
    # 特征列名 - 修改为与数据集匹配的中文列名
    FEATURE_COLUMNS = [
        '相对湿度', '水汽压', '温度', '降水量', '太阳总辐射',
        '气压', '风速', '风向角', '体感温度', '风力等级',
        'hour', 'day', 'month', 'weekday'  # 时间特征保持英文小写
    ]
    
    # 保存模型和日志的路径
    MODEL_SAVE_PATH = 'checkpoints/'
    LOG_PATH = 'logs/' 
    
    # 调整早停参数
    PATIENCE = 15
    MIN_DELTA = 1e-4
    
    # 添加dropout参数
    DROPOUT = 0.3  # 增加dropout率 